App({
  config: {
    url: 'https://locally.uieee.com/'
  },
  globaData:{
    topheight:0,
    isback:false,
    islogin:false,
    gologin:false,
    goaddress:''
  },
  onLaunch() {
    this.clearbackstatus();
    this.clearloginstatus();
    wx.getSystemInfo({
      success: (res) => {
        this.globaData.topheight = res.statusBarHeight
      }
    })
  },
  clearloginstatus(){
    wx.removeStorage({
      key: 'islogin',
      success(res) {
        console.log('删除了登录状态！')
      }
    });
  },
  clearbackstatus(){
    wx.removeStorage({
      key: 'isback',
      success(res) {
        console.log('删除了返回状态！')
      }
    });
  },
  getbackstatus() {
    const isback = wx.getStorageSync('isback')
    if (isback) {
      this.globaData.isback = true
      console.log('有值')
    } else {
      this.globaData.isback = false
      console.log('没有值')
    }
  },
  setbackstatus(data) {
    console.log(data)
    wx.setStorage({
      key: 'isback',
      data
    })
  }
})